const express = require("express")
const path = require("path")
const app = express()

require("./middleware/mongodb")

app
  .use(require("./middleware/cors"))
  .use(express.static(path.resolve(__dirname, "./static")))
  // .use(require("./middleware/session"))
  .use(express.json())
  .use(express.urlencoded({ extended: true }))
  .use("/api", require("./router/index"))
  .listen(3000, () => {
    console.log("3000端口已监听")
  })
